package com.guigu.buy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
@Data
@TableName("sys_user")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String name;

    private String loginName;

    private String password;

    private String avatarImg;

    private String phone;

    private Integer locked;

    private String status;
    //用户所拥有的角色
    @TableField(value = "roles",exist = false)
    private List<SysRole> roles;

}
